// 注册帐号校验标识
var registerNameFlag = false;
var nickNameFlag = false;
var passedFlag = false;
var realNameFlag = false;
var identityFlag = false;
var validCodeFlag = false;
var userRealNameFlag = false;
var userEmailFlag = false;
var userAddressFlag = false;
var mobilephoneFlag = true;
var spnameFlag = true;
var _message_userName = '';
var _message_userRealName = '';
var _message_userEmail = '';
var _message_userAddr = '';
var _message_nickName = '';
var _message_password = '';
var _message_realName = '';
var _message_identity = '';
var _message_validCode = '';
var _message_mobilephone = '';
var _message_spname = '';
var _check_finish_userName = false;
var _check_finish_nickName = false;
var _check_finish_userRealName = false;
var _check_finish_userEmail = false;
var _check_finish_userAddr = false;
var _check_finish_password = false;
var _check_finish_realName = false;
var _check_finish_identity = false;
var _check_finish_validCode = false;
var _check_finish_mobilephone = false;
var _check_finish_spname = false;

var coopIdRepeatFlag = false;
var _message_coopIdRepeat = '';

var circle = 0;
function checkFinish() {
    if (!registerNameFlag) {
        return false;
    }
    if (!passedFlag) {
        return false;
    }
    if (!userRealNameFlag) {
        return false;
    }
    if (!userEmailFlag) {
        return false;
    }
    if (!validCodeFlag) {
        return false;
    }
    return true;
}


function CheckReg() {
    return checkFinish();
}

function daxiaoxie(str) {
    $('#ctl00_ContentPlaceHolder2_registerName').val(str.toLowerCase());
    $('#ctl00_ContentPlaceHolder2_userNameInfo').attr('style', 'color:red;font-size:12px;');
    $('#ctl00_ContentPlaceHolder2_userNameInfo').html('用户名必须为字母、数字或字母数字组合,不区分大小写');
}
 

function toDBC(Str) {
    var DBCStr = "";
    for (var i = 0; i < Str.length; i++) {
        var c = Str.charCodeAt(i);
        if (c == 12288) {
            DBCStr += String.fromCharCode(32);
            continue;
        }
        if (c > 65280 && c < 65375) {
            DBCStr += String.fromCharCode(c - 65248);
            continue;
        }
        DBCStr += String.fromCharCode(c);
    }
    return DBCStr;
}
function Lenth(s) {
    if (s.length < 6 || s.length > 16)
    { return false }
    else
    { return true }
}
function CheckName(s) {
    if (!/^[A-Za-z0-9]+$/.test(s))
        return false;
    else
        return true;
}
  
//判断是否为中文字体
function CheckRealName(s) {
    if (!/^[\u4e00-\u9fa5]+$/.test(s))
        return false;
    else
        return true;
}
 
function checkUserName(name) {

    if (name == null || name.length == 0) {
        registerNameFlag = false;
        $('#ctl00_ContentPlaceHolder2_userNameInfo').attr('style', 'color:#FF0000;font-size:12px;');
        $('#ctl00_ContentPlaceHolder2_userNameInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '请输入您要注册的帐号');
        _message_userName = '请输入您要注册的帐号';
        _check_finish_userName = true;
        return;
    }
    if (!Lenth(name)) {
        registerNameFlag = false;
        $('#ctl00_ContentPlaceHolder2_userNameInfo').attr('style', 'color:#FF0000;font-size:12px;');
        $('#ctl00_ContentPlaceHolder2_userNameInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '必须6-16位');
        _message_userName = '必须6-16位';
        _check_finish_userName = true;
        return;
    }
    if (!CheckName(name)) {
        registerNameFlag = false;
        $('#ctl00_ContentPlaceHolder2_userNameInfo').attr('style', 'color:#FF0000;font-size:12px;');
        $('#ctl00_ContentPlaceHolder2_userNameInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '用户名必须为字母、数字或字母数字组合,不区分大小写');
        _message_userName = '用户名必须为字母、数字或字母数字组合,不区分大小写';
        _check_finish_userName = true;
        return;
    }

    $.ajax({
        type: "GET",
        async: false,
        url: "RegisterCheck.aspx?Name=" + name + "&Type=1",
        //data: { Name: name, Type: 1 },
        success: function (data) {
            if (decodeURI(data) != "0") {
                $('#ctl00_ContentPlaceHolder2_userNameInfo').attr('style', 'color:#FF0000;font-size:12px;');
                $('#ctl00_ContentPlaceHolder2_userNameInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />' + '该用户名已经存在');
            }
            else {
                $('#ctl00_ContentPlaceHolder2_userNameInfo').attr('style', 'color:#009900;font-size:12px;');
                $('#ctl00_ContentPlaceHolder2_userNameInfo').html('<img src="right_icon.gif"/*tpa=http://www.qawsd.pw/js/images/right_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />');
                registerNameFlag = true;
            }
        }
    });
}

///计算昵称长度
function calNickName(psNickName, event) {
    var nTotalLength = 0;
    var a = psNickName.split("");
    for (var i = 0; i < a.length; i++) {
        if (a[i].charCodeAt(0) < 299) {
            nTotalLength++;
        } else {
            nTotalLength += 2;
        }
    }
    if (nTotalLength < 6 || nTotalLength > 16) {
        return false;
    } else {
        return true;
    }
}
 

function checkVerificationCode(name) {
    if (name == null || name.length == 0) {
        validCodeFlag = false;
        $('#VerificationCodeInfo').attr('style', 'color:#FF0000;font-size:12px;');
        $('#VerificationCodeInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '请输入验证码');
        _message_validCode = '请输入验证码';
        _check_finish_validCode = true;
        return;
    }
    $.ajax({
        type: "GET",
        async: false,
        url: "RegisterCheck.aspx?t="+(new Date()).toString()+"&Name=" + name + "&Type=4", 
        success: function (data) {
            if (decodeURI(data) == "true") {
                $('#VerificationCodeInfo').attr('style', 'color:#FF0000;font-size:12px;');
                $('#VerificationCodeInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />' + '验证码不正确');
            }
            else {
                $('#VerificationCodeInfo').attr('style', 'color:#009900;font-size:12px;');
                $('#VerificationCodeInfo').html('<img src="right_icon.gif"/*tpa=http://www.qawsd.pw/js/images/right_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />');
                validCodeFlag = true;
            }
        }
    });
}

function checkPassword() {
    var passwd = $('#ctl00_ContentPlaceHolder2_iPassword').val();
    var repasswd = $('#rePassword').val();
    if (passwd == '') {
        $('#passwordInfo').attr('style', 'color:#FF0000;font-size:12px;');
        $('#passwordInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '请输入您的密码');
        passedFlag = false;
        _message_password = '请输入您的密码';
        _check_finish_password = true;
        return;
    }
    if (passwd.length < 6 || passwd.length > 16) {
        $('#passwordInfo').attr('style', 'color:#FF0000;font-size:12px;');
        $('#passwordInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '密码长度必须为6-16位');
        passedFlag = false;
        _message_password = '密码长度必须为6-16位';
        _check_finish_password = true;
        return;
    }
    if (repasswd != '') {
        if (passwd != repasswd) {
            $('#passwordInfo').attr('style', 'color:#FF0000;font-size:12px;');
            $('#passwordInfo').html('<img src="right_icon.gif"/*tpa=http://www.qawsd.pw/js/images/right_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />');
            $('#rpasswordInfo').attr('style', 'color:#FF0000;font-size:12px;');
            $('#rpasswordInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
							+ '两次密码输入不一致，请您重新输入');
            passedFlag = false;
            _message_password = '两次密码输入不一致，请您重新输入';
            _check_finish_password = true;
            return;
        } else {
            $('#passwordInfo').attr('style', 'color:#009900;font-size:12px;');
            $('#passwordInfo').html('<img src="right_icon.gif"/*tpa=http://www.qawsd.pw/js/images/right_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />');
            passedFlag = true;
            _check_finish_password = true;
            return;
        }
    }
    $('#passwordInfo').attr('style', 'color:#009900;font-size:12px;');
    $('#passwordInfo').html('<img src="right_icon.gif"/*tpa=http://www.qawsd.pw/js/images/right_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />');
    _check_finish_password = true;
    return;
}

function checkRepassword() {
    var passwd = $('#ctl00_ContentPlaceHolder2_iPassword').val();
    var repasswd = $('#rePassword').val();

    if (repasswd == '') {
        $('#rpasswordInfo').attr('style', 'color:#FF0000;font-size:12px;');
        $('#rpasswordInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '请输入确认密码');
        passedFlag = false;
        _message_password = '请输入确认密码';
        _check_finish_password = true;
        return;
    }
    if (repasswd.length < 6 || repasswd.length > 16) {
        $('#rpasswordInfo').attr('style', 'color:#FF0000;font-size:12px;');
        $('#rpasswordInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '确认密码长度必须为6-16位');
        passedFlag = false;
        _message_password = '确认密码长度必须为6-16位';
        _check_finish_password = true;
        return;
    }
    if (passwd != repasswd) {
        if (passwd == '') {
            $('#passwordInfo').attr('style', 'color:#FF0000;font-size:12px;');
            $('#passwordInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '请输入您的密码');
            _message_password = '请输入您的密码';
            _check_finish_password = true;
        } else {
            $('#rpasswordInfo').attr('style', 'color:#FF0000;font-size:12px;');
            $('#rpasswordInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '两次密码输入不一致，请您重新输入');
            _message_password = '两次密码输入不一致，请您重新输入';
            _check_finish_password = true;
        }
        passedFlag = false;
        return;
    }
    $('#rpasswordInfo').attr('style', 'color:red;font-size:12px;');
    $('#rpasswordInfo').html('<img src="right_icon.gif"/*tpa=http://www.qawsd.pw/js/images/right_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />');
    passedFlag = true;
    _check_finish_password = true;
    return
}
function checkAddress(addr) {
    if (addr == null || addr.length == 0) {
        $('#ctl00_ContentPlaceHolder1_userAddrInfo').attr('style', 'color:#FF0000;font-size:12px;');
        $('#ctl00_ContentPlaceHolder1_userAddrInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '请输入您的地址');
        userAddressFlag = false;
        _message_userAddr = '请输入您的地址';
        _check_finish_userAddr = true;
        return;
    }
    if (addr.length < 2 || addr.length > 40) {
        $('#ctl00_ContentPlaceHolder1_userAddrInfo').attr('style', 'color:#FF0000;font-size:12px;');
        $('#ctl00_ContentPlaceHolder1_userAddrInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '地址长度必须为2-40位');
        userAddressFlag = false;
        _message_userAddr = '地址长度必须为2-40位';
        _check_finish_userAddr = true;
        return;
    }

    $('#ctl00_ContentPlaceHolder1_userAddrInfo').attr('style', 'color:#009900;font-size:12px;');
    $('#ctl00_ContentPlaceHolder1_userAddrInfo').html('<img src="right_icon.gif"/*tpa=http://www.qawsd.pw/js/images/right_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />');
    userAddressFlag = true;
    _check_finish_userAddr = true;
    return;
}

function checkEmail(email) { 
    if (email != "") {
        if (!isEmail(email)) {
            $('#ctl00_ContentPlaceHolder2_userEmailInfo').attr('style', 'color:#FF0000;font-size:12px;');
            $('#ctl00_ContentPlaceHolder2_userEmailInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '邮箱格式不正确');
            userEmailFlag = false;
            _message_userEmail = '邮箱格式不正确';
            _check_finish_userEmail = true;
            return;
        }

        $.ajax({
            type: "GET",
            async: false,
            url: "RegisterCheck.aspx?t="+(new Date()).toString()+"&Name=" + email + "&Type=5", 
            success: function (data) {
                if (decodeURI(data) == "1") {
                    $('#ctl00_ContentPlaceHolder2_userEmailInfo').attr('style', 'color:#FF0000;font-size:12px;');
                    $('#ctl00_ContentPlaceHolder2_userEmailInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />' + '该邮箱已经使用');
                    userEmailFlag = false;
                    return;
                }
                else {
                    $('#ctl00_ContentPlaceHolder2_userEmailInfo').attr('style', 'color:#009900;font-size:12px;');
                    $('#ctl00_ContentPlaceHolder2_userEmailInfo').html('<img src="right_icon.gif"/*tpa=http://www.qawsd.pw/js/images/right_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />');
                    userEmailFlag = true;
                }
            }
        });
    } else {
        $('#ctl00_ContentPlaceHolder2_userEmailInfo').attr('style', 'color:#009900;font-size:12px;');
        $('#ctl00_ContentPlaceHolder2_userEmailInfo').html('<img src="right_icon.gif"/*tpa=http://www.qawsd.pw/js/images/right_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />');
        userEmailFlag = true;
    }
}

function isEmail(strEmail) {
    var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
    return reg.test(strEmail);
}


/**add */
function checkUserRealName(name) {
    if (name == null || name.length == 0) {
        userRealNameFlag = false;
        $('#ctl00_ContentPlaceHolder2_userRealNameInfo').attr('style', 'color:#FF0000;font-size:12px;');
        $('#ctl00_ContentPlaceHolder2_userRealNameInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '请输入您的真实姓名');
        _message_userRealName = '请输入您的真实姓名';
        _check_finish_userRealName = true;
        return;
    }
    if (name.length < 2 || name.length > 40) {
        $('#ctl00_ContentPlaceHolder2_userRealNameInfo').attr('style', 'color:#FF0000;font-size:12px;');
        $('#ctl00_ContentPlaceHolder2_userRealNameInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '用户姓名必须为2-40位');
        userRealNameFlag = false;
        _message_userRealName = '用户姓名必须为2-40位';
        _check_finish_userRealName = true;
        return;
    }
    if (!CheckRealName(name)) {
        userRealNameFlag = false;
        $('#ctl00_ContentPlaceHolder2_userRealNameInfo').attr('style', 'color:#FF0000;font-size:12px;');
        $('#ctl00_ContentPlaceHolder2_userRealNameInfo').html('<img src="error_icon.gif"/*tpa=http://www.qawsd.pw/js/images/error_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />'
						+ '真实姓名格式不正确');
        _message_userRealName = '真实姓名格式不正确';
        _check_finish_userRealName = true;
        return;
    }

    $('#ctl00_ContentPlaceHolder2_userRealNameInfo').attr('style', 'color:#009900;font-size:12px;');
    $('#ctl00_ContentPlaceHolder2_userRealNameInfo').html('<img src="right_icon.gif"/*tpa=http://www.qawsd.pw/js/images/right_icon.gif*/ width="15" height="14" style="vertical-align:bottom;display:inline;position:relative;padding-right:5px;top:-3px;" />');

    userRealNameFlag = true;
    _check_finish_userRealName = true;

}

 


function validePassword(pwdstring, module) {
    var shu = /^[0-9]/;
    var char = /^[a-zA-Z]/;
    var regm = /^[0-9]{+}/;
    var cs = getCharNum(pwdstring);
    len = pwdstring.length;
    password = $('#ctl00_ContentPlaceHolder2_iPassword').val();
    if (len == 0) {
        $('#passwordInfo').html("");
        document.getElementById("passlevel").src = "password_dangrous-1.png"/*tpa=http://www.qawsd.pw/js/images/password_dangrous.png*/;
    } else if (0 < len && len < 6) {
        /** 密码长度小于6时 * */
        $('#passwordInfo').attr('style', 'color:red;font-size:12px;');
        $('#passwordInfo').html("密码至少为六位！");
        document.getElementById("passlevel").src = "password_dangrous-1.png"/*tpa=http://www.qawsd.pw/js/images/password_dangrous.png*/;
    } else if (len >= 6 && len <= 8) {
        if (isNaN(password)) {
            if (ifNumberExist(password)) {
                $('#passwordInfo').attr('style', 'color:#009900;font-size:12px;');
                $('#passwordInfo').html("友情提醒：密码最好为数字与字母的组合！");
                document.getElementById("passlevel").src = "password_normal.png"/*tpa=http://www.qawsd.pw/js/images/password_normal.png*/;
            } else {
                $('#passwordInfo').attr('style', 'color:#009900;font-size:12px;');
                $('#passwordInfo').html("友情提醒：再加两个数字更安全！");
                document.getElementById("passlevel").src = "password_dangrous-1.png"/*tpa=http://www.qawsd.pw/js/images/password_dangrous.png*/;
            }
        } else {
            $('#passwordInfo').attr('style', 'color:#009900;font-size:12px;');
            $('#passwordInfo').html("友情提醒：密码最好为数字与字母的组合！");
            document.getElementById("passlevel").src = "password_dangrous-1.png"/*tpa=http://www.qawsd.pw/js/images/password_dangrous.png*/;
        }
    } else if (len >= 9 && len <= 13) {
        if (isNaN(password)) {
            if (ifNumberExist(password)) {
                /** 不存在数字 * */
                $('#passwordInfo').attr('style', 'color:#009900;font-size:12px;');
                $('#passwordInfo').html("友情提醒：密码最好为数字与字母的组合！");
                document.getElementById("passlevel").src = "password_safe.png"/*tpa=http://www.qawsd.pw/js/images/password_safe.png*/;
            } else {
                $('#passwordInfo').attr('style', 'color:#009900;font-size:12px;');
                $('#passwordInfo').html("友情提醒：再加两个数字更安全！");
                document.getElementById("passlevel").src = "password_normal.png"/*tpa=http://www.qawsd.pw/js/images/password_normal.png*/;
            }
        } else {
            $('#passwordInfo').attr('style', 'color:#009900;font-size:12px;');
            $('#passwordInfo').html("友情提醒：密码最好为数字与字母的组合！");
            document.getElementById("passlevel").src = "password_normal.png"/*tpa=http://www.qawsd.pw/js/images/password_normal.png*/;
        }
    } else {
        if (isNaN(password)) {
            if (!ifNumberExist(password)) {
                $('#passwordInfo').attr('style', 'color:#009900;font-size:12px;');
                $('#passwordInfo').html("友情提醒：密码最好为数字与字母的组合！");
                document.getElementById("passlevel").src = "password_normal.png"/*tpa=http://www.qawsd.pw/js/images/password_normal.png*/;
            } else {
                $('#passwordInfo').html('<img src="right_icon.gif"/*tpa=http://www.qawsd.pw/js/images/right_icon.gif*/ width="18" height="18"/>');
                document.getElementById("passlevel").src = "password_safe.png"/*tpa=http://www.qawsd.pw/js/images/password_safe.png*/;
            }
        } else {
            $('#passwordInfo').attr('style', 'color:#009900;font-size:12px;');
            $('#passwordInfo').html("友情提醒：密码最好为数字与字母的组合！");
            document.getElementById("passlevel").src = "password_safe.png"/*tpa=http://www.qawsd.pw/js/images/password_safe.png*/;
        }
    }
}

function getCharNum(str) {
    var sum = 0;
    for (var i = 0; i < str.length; i++) {
        if (((str.charCodeAt(i) <= 47) || (str.charCodeAt(i) >= 57))) {
            sum = sum + 1;
        }
    }
    return sum;
}

function ifNumberExist(str) {
    var reg = new RegExp('\w*[0-9]+\w*');
    if (reg.test(str)) {
        return true;
    }
    return false;
}
